package com.hjm.common.core.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum ResultCode {
    /** 定义状态码 */
    //操作成功
    SUCCESS                     (1000, "操作成功"),

    //服务器内部错误，友好提示
    ERROR                       (2000, "服务繁忙请稍后重试"),

    //操作失败，但是服务器不存在异常
    FAILED                      (3000, "操作失败"),
    FAILED_UNAUTHORIZED         (3001, "未授权"),
    FAILED_PARAMS_VALIDATE      (3002, "参数校验失败"),
    FAILED_FORBIDDEN            (3003, "禁止访问"),
    FAILED_NOT_EXISTS           (3004, "资源不存在"),
    FAILED_ALREADY_EXISTS       (3005, "资源已存在"),

    FAILED_QUESTION_IS_EXISTS    (3006, "题目已存在"),


    AILED_USER_EMPTY                 (3100, "用户名或密码为空"),
    AILED_USER_EXISTS                (3101, "用户已存在"),
    FAILED_USER_NOT_EXISTS           (3102, "用户不存在"),
    FAILED_LOGIN                     (3103, "用户名或密码错误"),
    FAILED_USER_BANNED               (3104, "您已被列入黑名单, 请联系管理员."),
    FAILED_PHONE_FORMAT              (3105,"手机格式错误"),
    FAILED_CODE_FREQUENT             (3105,"验证码发送频繁，请稍后重试"),
    FAILED_TIME_LIMIT                (3106,"验证码发送频繁，超出当日限制"),
    FAILED_CODE_ERROR                (3107,"验证码错误"),
    FAILED_CODE_ERROR_SEND           (3107,"请先发送验证码验证码"),
    FAILED_CODE_SEND                 (3108,"验证码发送失败"),


    EXAM_IS_EXISTS                      (3201,"竞赛已存在"),
    EXAM_IS_NOT_EXISTS                  (3202,"竞赛不存在"),
    EXAM_QUESTION_IS_NOT_EXISTS         (3203,"题目不存在"),
    EXAM_START_TIME_AFTER_END_TIME      (3204,"开始时间after结束时间"),
    EXAM_START_TIME_BEFORE_NOW_TIME     (3205,"开始时间before当前时间"),
    EXAM_IS_BEGIN                       (3206,"竞赛已开始"),
    EXAM_NO_INCLUDE_QUESTION            (3207,"竞赛无题不允许发布"),
    EXAM_IS_END                         (3208,"竞赛已完赛"),


    USER_IS_ENTER                         (3209,"用户已报名"),



    FAILED_FILE_UPLOAD                  (3301,"文件上传失败"),
    FAILED_FILE_UPLOAD_TIME_LIMIT       (3302,"文件上传超出限制"),


    FAILED_FIRST_QUESTION               (3401,"已经是第一题了"),
    FAILED_LAST_QUESTION                (3402,"已经是最后一题了"),


    FAILED_NOT_SUPPORT_TYPE             (3501,"不支持的语言类型"),


    FAILED_RABBIT_PRODUCE              (3601,"RabbitMQ 生产者连接失败");


    private int code;             // 状态码

    private String msg;           // 状态描述



}
